import java.io.File;
import java.io.IOException;

public class Demo1 {

    public static void main(String[] args) throws IOException {
        //String path = "c:\\windows\\main";
        //String path = "./windows/main";
        File path = new File("./test.txt");
        System.out.println(path.getParent());
        System.out.println(path.getName());
        System.out.println(path.getPath());
        System.out.println(path.getAbsolutePath());
        System.out.println(path.getCanonicalPath());
    }
}
